﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IrisGenerator.Common.Core;
using IrisGenerator.Common.Core.UI;
using IrisGenerator.Common.UI.XmlConfiguration;
using IrisGenerator.Framework.Reflection;
using IrisGenerator.Framework.UI.Controls;

namespace IrisGenerator.Common.UI.Controls.DataGrids
{
    public class TargetDataGrid:BindableDataGrid<Target>
    {
        /// <summary>
        /// .ctor
        /// </summary>
        public TargetDataGrid()
            : base()
        {
            
            this.SourceMethod = new MethodCall();
            this.SourceMethod.MethodName = "GetAll";
            this.SourceMethod.TypeName = "IrisGenerator.Common.Core.Target";
            this.BindingType = "IrisGenerator.Common.Core.ConnectedCollectionBase`1";
            
            InitializeGrid();
            
        }

        private void InitializeGrid()
        {
            this.Name = "Targets";
            this.AutoGenerateColumns = false;
            XmlConfigFileReader.ConfigFilePath = @"C:\Personnel\Developpement\Code Generator 2008\IrisGenerator\IrisGenerator.Common\ControlsConfigFile.xml";
            XmlConfiguration.XmlConfigFileReader.LoadConfiguration(this);
        }

    }
}
